package com.azt.api.pojo;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.azt.pojo.BaseEntity;

@Table(name = "azt_channel")
public class Channel extends BaseEntity {

	@Column(name = "channel_name")
	private String channelName;// 栏目名称
	
	@Column(name = "parent_id")
	private Integer parentId;// 父Id
	
	@Column(name = "code")
	private String code;// 编码

	@Transient
	private List<Channel> children;
	
	@Transient
	private List<Content> contents;//栏目下的内容，新闻什么的

//	@OneToMany(mappedBy = "parentId", fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	public List<Channel> getChildren() {
		return children;
	}

	public void setChildren(List<Channel> children) {
		this.children = children;
	}
	
	
	public List<Content> getContents() {
		return contents;
	}

	public void setContents(List<Content> contents) {
		this.contents = contents;
	}

	
	public String getChannelName() {
		return channelName;
	}

	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	
	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
